import {
  getAction,
  deleteAction,
  putAction,
  fromDataPostAction,
  putparamsAction,
  postAction,
  httpAction
} from '@/api/manage'

// 点巡检项目
const messCheckItemList = (params) => getAction('/mess/messCheckItem/list', params) // 列表
const messCheckItemAdd = (params) => postAction('/mess/messCheckItem/add', params) // 新建
const messCheckItemDelete = (params) => deleteAction(`/mess/messCheckItem/delete?id=${params}`) // 删除
const messCheckItemDeleteBatch = (params) => deleteAction(`/mess/messCheckItem/deleteBatch?ids=${params}`) // 批量删除
const messCheckItemCheckItem = (params) => getAction(`/mess/messCheckItem/checkItem?id=${params}`) // 校验是否可删除
const messCheckItemEdit = (params) => putAction('/mess/messCheckItem/edit', params) // 编辑
const messCheckItemQueryById = (params) => getAction(`/mess/messCheckItem/queryById?id=${params}`) // 详情

// 点巡检任务
const messDeviceCheckTaskList = (params) => getAction('/mess/messDeviceCheckTask/list', params) // 列表
const messDeviceCheckTaskAdd = (params) => postAction('/mess/messDeviceCheckTask/add', params) // 新建检查
const messDeviceCheckTaskReport = (params) => postAction('/mess/messDeviceCheckTask/report', params) // 汇报
const messDeviceCheckTaskDelete = (params) => deleteAction(`/mess/messDeviceCheckTask/delete?id=${params}`) // 删除
const messDeviceCheckTaskDeleteBatch = (params) => deleteAction(`/mess/messDeviceCheckTask/deleteBatch?ids=${params}`) // 批量删除
const messDeviceCheckTaskQueryById = (params) => getAction(`/mess/messDeviceCheckTask/queryById?id=${params}`) // 详情
// 点巡检方案
const messDeviceCheckProgramList = (params) => getAction('/mess/messDeviceCheckProgram/list', params) // 列表
const messDeviceCheckProgramDelete = (params) => deleteAction(`/mess/messDeviceCheckProgram/delete?id=${params}`) // 删除
const messDeviceCheckProgramDeleteBatch = (params) =>
  deleteAction(`/mess/messDeviceCheckProgram/deleteBatch?ids=${params}`) // 批量删除
const deviceDeviceList = (params) => getAction(`/mess/device/deviceList?deviceCategory=${params}`) // 根据分类ID设备下拉
const messDeviceCheckProgramAdd = (params) => postAction('/mess/messDeviceCheckProgram/add', params) // 新建
const messDeviceCheckProgramEdit = (params) => putAction('/mess/messDeviceCheckProgram/edit', params) // 编辑
const messDeviceCheckProgramQueryById = (params) => getAction(`/mess/messDeviceCheckProgram/queryById?id=${params}`) // 详情
const deviceCheckProgramUpdateStatus = (params) => getAction('/mess/messDeviceCheckProgram/updateStatus', params) // 启用禁用

// 仓库报表
const inventoryStatistics = (params) => getAction('/wms/wmsReportForms/inventoryStatistics', params) // 实时库存表展示数据
const inventoryPageList = (params) => getAction('/wms/wmsReportForms/inventoryPageList', params) // 仓库报表 实时库存 列表

const wmsReportFormsExportGoodsInventoryXls = (params) =>
  postAction('wms/wmsReportForms/exportGoodsInventoryXls', params) // 实时库存表导出
const getInOutNum = (params) => getAction('/wms/wmsReportForms/getInOutNum', params) // 月度库存收支统计
const wmsReportFormsMonthInOutPageList = (params) => getAction('/wms/wmsReportForms/monthInOutPageList', params) // 月度仓库收支表展示数据
const wmsReportFormsExportMonthInOutXls = (params) => postAction('/wms/wmsReportForms/exportMonthInOutXls', params) // 月度库存收支表导出
const wmsReportFormsSecurityPageList = (params) => getAction('/wms/wmsReportForms/securityPageList', params) // 库存水位预警表 安全库存列表
const wmsReportFormsMaxPageList = (params) => getAction('/wms/wmsReportForms/maxPageList', params) // 库存水位预警表 最大库存列表
const getWarningNum = (params) => getAction('/wms/wmsReportForms/getWarningNum', params) // 月度库存收支统计
const getExceptionInventoryPageList = (params) => getAction('/wms/wmsReportForms/getExceptionInventoryPageList', params) // 盘点异常汇总分页列表
const wmsWarehouseInventoryUpdateException = (params) =>
  getAction(`/wms/wmsWarehouseInventory/updateException?id=${params}`) // 物资盘点管理-异常处理
const getExceptionInventoryNum = (params) => getAction('/wms/wmsReportForms/getExceptionInventoryNum', params) // 盘点异常统计

// 生产报表
const getYieldReport = (params) => getAction('/mess/messProductReport/getYieldReport', params) // 产量报表 列表

// 销售报表
const getCustomerNum = (params) => getAction('/erp/saleReportForms/getCustomerNum', params) // 销售报表 客户报表 统计
const customerPageList = (params) => getAction('/erp/saleReportForms/customerPageList', params) // 销售报表 客户报表 列表
// 设备报表-设备总览
const getDeviceOverviewReportList = (params) => getAction('/mess/deviceReport/getDeviceOverviewReportList', params) // 设备报表-设备总览 列表
// 质量报表 - 生产检验报表
const getQualityInspectionReportList = (params) =>
  getAction('/mess/qualityInspectionReport/getQualityInspectionReportList', params) // 质量报表 - 生产检验报表 列表
const getMessQualityReport = (params) => getAction('/mess/qualityInspectionReport/getMessQualityReport', params) // 质量报表 - 生产检验报表 统计
const getProcessList = (params) => getAction('/mess/qualityInspectionReport/getProcessList', params) // 质量报表 - 生产检验报表 工序 下拉
const basicUnitAdd = (params) => postAction('/basic/basicUnit/add', params) // 单位的添加
const basicUnitList = (params) => getAction('/basic/basicUnit/list', params) // 单位的添加
const basicUnitEdit = (params) => putAction('/basic/basicUnit/edit', params) // 单位的编辑
const basicUnitQueryUnit = (params) => getAction('/basic/basicUnit/queryUnit', params) // 单位是否存在
const basicUnitDelete = (params) => deleteAction('/basic/basicUnit/delete', params) // 单位删除
const basicProductionProcessesAdd = (params) => postAction('/basic/basicProductionProcesses/add', params) // 工序的添加
const basicProductionProcessesEdit = (params) => putAction('/basic/basicProductionProcesses/edit', params) // 工序的编辑
const basicProductionProcessesQueryByProcessesName = (params) =>
  getAction('/basic/basicProductionProcesses/queryByProcessesName', params) // 单位是否存在
const basicProductionProcessesDelete = (params) => deleteAction('/basic/basicProductionProcesses/delete', params) // 工序删除
const basicProductionProcessesDeleteBatch = (params) =>
  deleteAction('/basic/basicProductionProcesses/deleteBatch', params) // 工序批量删除
const basicNonconformityAdd = (params) => postAction('/basic/basicNonconformity/add', params) // 不合格原因的添加
const basicNonconformityEdit = (params) => putAction('/basic/basicNonconformity/edit', params) // 不合格原因的编辑
const basicNonconformityQueryNonconformity = (params) =>
  getAction('/basic/basicNonconformity/queryNonconformity', params) // 不合格原因是否存在
const basicNonconformityDelete = (params) => deleteAction('/basic/basicNonconformity/delete', params) // 不合格原因的删除
const basicSerialInfoAdd = (params) => postAction('/basicserial/basicSerialInfo/add', params) // 物品的添加
const basicSerialInfoEdit = (params) => putAction('/basicserial/basicSerialInfo/edit', params) // 物品的编辑
const basicSerialInfoDelete = (params) => deleteAction('/basicserial/basicSerialInfo/delete', params) // 物品的删除
const basicSerialInfoDeleteBatch = (params) => deleteAction('/basicserial/basicSerialInfo/deleteBatch', params) // 物品批量删除
const basicSerialInfoQueryById = (params) => getAction('/basicserial/basicSerialInfo/queryById', params) // 物品详情
//工艺路线
const basicProcessRouteInfoAdd = (params) => postAction('/basicprocess/basicProcessRouteInfo/add', params) // 工艺路线的添加
const basicProcessRouteInfoEdit = (params) => putAction('/basicprocess/basicProcessRouteInfo/edit', params) // 工艺路线的编辑
const basicProcessRouteInfoDelete = (params) => deleteAction('/basicprocess/basicProcessRouteInfo/delete', params) // 工艺路线的删除
const basicProcessRouteInfoDeleteBatch = (params) =>
  deleteAction('/basicprocess/basicProcessRouteInfo/deleteBatch', params) // 工艺路线批量删除
//出库单
const warehouseOutboundOrderInfoAdd = (params) => postAction('/warehouse/WarehouseOutboundOrderInfo/add', params) // 出库单的添加
const warehouseOutboundOrderInfoEdit = (params) => putAction('/warehouse/WarehouseOutboundOrderInfo/edit', params) // 出库单的编辑
const warehouseOutboundOrderInfoQueryById = (params) =>
  getAction('/warehouse/WarehouseOutboundOrderInfo/queryById', params) // 出库单的编辑
const warehouseOutboundOrderInfoDelete = (params) =>
  deleteAction('/warehouse/WarehouseOutboundOrderInfo/delete', params) // 出库单的删除
const warehouseOutboundOrderInfoDeleteBatch = (params) =>
  deleteAction('/warehouse/WarehouseOutboundOrderInfo/deleteBatch', params) // 出库单批量删除
const warehouseEntryDetailList = (params) => getAction('/warehouse/warehouseEntryDetail/list', params) // 出入库单详情
const warehouseOutboundOrderInfoEntryType = (params) =>
  getAction('/warehouse/WarehouseOutboundOrderInfo/entryType', params) // 出库单类型

// 出入库单自定义表单字段
const formTypeExtendedFieldList = (params) => getAction('/basicDynamicFieldConfig/getFormTypeExtendedField', params) // 出入库单自定义表单字段

// 表单字段配置 - 列表查询
const basicDynamicFieldConfigList = (params) => getAction('/basicDynamicFieldConfig/list', params)
// 表单字段配置 - 客户详情
const getCustomerDetail = (params) => getAction('/sale/saleCustomInfo/getById', params)

//入库单
const warehouseEntryInfoAdd = (params) => postAction('/warehouse/warehouseEntryInfo/add', params) // 入库单的添加
const warehouseEntryInfoEdit = (params) => putAction('/warehouse/warehouseEntryInfo/edit', params) // 入库单的编辑
const warehouseEntryInfoQueryById = (params) => getAction('/warehouse/warehouseEntryInfo/queryById', params) // 入库单的编辑
const warehouseEntryInfoDelete = (params) => deleteAction('/warehouse/warehouseEntryInfo/delete', params) // 入库单的删除
const warehouseEntryInfoDeleteBatch = (params) => deleteAction('/warehouse/warehouseEntryInfo/deleteBatch', params) // 入库单批量删除
const warehouseEntryInfoEntryType = (params) => getAction('/warehouse/warehouseEntryInfo/entryType', params) // 入库单类型

// 报表统计
const getProductionList = (params) => getAction('/report/production/list', params) // 产量统计 列表
const getProductionReportsList = (params) => getAction('/report/productionReports/list', params) // 生产报表 列表
const getSerialAlertList = (params) => getAction('/report/serialAlert/list', params) // 库存水位预警 列表
const getUnqualifiedAnalyzeList = (params) => getAction('/unqualifiedanalyze/unqualifiedAnalyze/list', params) // 不合格分析 列表
const getUnqualifiedTrend = (params) => getAction('/unqualifiedanalyze/unqualifiedAnalyze/trend', params) // 不合格分析-趋势查询
const getUnqualifiedDistribution = (params) => getAction('/unqualifiedanalyze/unqualifiedAnalyze/distribution', params) // 不合格分析-分布查询
const getInventoryList = (params) => getAction('/inventory/inventory/list', params) // 实时库存表 列表
const getInventoryStatistics = (params) => getAction('/inventory/inventory/statistics', params) // 实时库存表 列表

//看板
const getBoardStatistics = (params) => getAction('/signboard/index/statistics', params) // 看板-统计数字
const getBoardreportWork = (params) => getAction('/signboard/index/reportWork', params) // 产量统计 列表
const getBoardorderList = (params) => postAction('/signboard/index/orderList', params) // 产量统计 列表
export const inspctionApi = {
  basicProcessRouteInfoAdd,
  basicProcessRouteInfoEdit,
  basicProcessRouteInfoDelete,
  basicProcessRouteInfoDeleteBatch,
  warehouseOutboundOrderInfoQueryById,
  warehouseOutboundOrderInfoAdd,
  warehouseOutboundOrderInfoEdit,
  warehouseOutboundOrderInfoDelete,
  warehouseOutboundOrderInfoDeleteBatch,
  warehouseEntryDetailList,
  warehouseEntryInfoQueryById,
  warehouseOutboundOrderInfoEntryType,
  formTypeExtendedFieldList,
  basicDynamicFieldConfigList,
  warehouseEntryInfoEntryType,
  warehouseEntryInfoAdd,
  warehouseEntryInfoEdit,
  warehouseEntryInfoDelete,
  warehouseEntryInfoDeleteBatch,
  basicSerialInfoAdd,
  basicSerialInfoEdit,
  basicSerialInfoDelete,
  basicSerialInfoDeleteBatch,
  basicSerialInfoQueryById,
  basicUnitList,
  basicUnitAdd,
  basicUnitEdit,
  basicUnitQueryUnit,
  basicUnitDelete,
  basicNonconformityAdd,
  basicNonconformityEdit,
  basicNonconformityQueryNonconformity,
  basicNonconformityDelete,
  basicProductionProcessesAdd,
  basicProductionProcessesEdit,
  basicProductionProcessesQueryByProcessesName,
  basicProductionProcessesDelete,
  basicProductionProcessesDeleteBatch,
  messCheckItemList,
  messCheckItemAdd,
  messCheckItemDelete,
  messCheckItemEdit,
  messCheckItemQueryById,
  messCheckItemDeleteBatch,
  messDeviceCheckTaskList,
  messDeviceCheckTaskAdd,
  messDeviceCheckTaskDelete,
  messDeviceCheckTaskDeleteBatch,
  messDeviceCheckTaskQueryById,
  messDeviceCheckProgramList,
  messDeviceCheckProgramDelete,
  messDeviceCheckProgramDeleteBatch,
  deviceDeviceList,
  messDeviceCheckProgramAdd,
  messDeviceCheckProgramEdit,
  messDeviceCheckProgramQueryById,
  deviceCheckProgramUpdateStatus,
  messDeviceCheckTaskReport,
  messCheckItemCheckItem,
  inventoryStatistics,
  getInOutNum,
  wmsReportFormsExportGoodsInventoryXls,
  wmsReportFormsMonthInOutPageList,
  wmsReportFormsExportMonthInOutXls,
  wmsReportFormsSecurityPageList,
  wmsReportFormsMaxPageList,
  getWarningNum,
  getExceptionInventoryPageList,
  getYieldReport,
  getCustomerNum,
  customerPageList,
  wmsWarehouseInventoryUpdateException,
  getDeviceOverviewReportList,
  getQualityInspectionReportList,
  getMessQualityReport,
  getProcessList,
  inventoryPageList,
  getExceptionInventoryNum,
  getProductionList,
  getProductionReportsList,
  getSerialAlertList,
  getUnqualifiedAnalyzeList,
  getUnqualifiedTrend,
  getUnqualifiedDistribution,
  getInventoryList,
  getInventoryStatistics,
  getCustomerDetail,
  getBoardStatistics,
  getBoardreportWork,
  getBoardorderList
}
